@model IEnumerable<Categories>

<li class="dropdown">
    <a asp-controller="Pizzas" asp-action="ListAll"
       class="dropdown-toggle" data-toggle="dropdown">Categories<b class="caret"></b></a>
    <ul class="dropdown-menu">
        @foreach (var category in Model)
        {
            <li>
                <a asp-controller="Pizzas" asp-action="ListCategory"
                   asp-route-categoryName="@category.Name">@category.Name</a>
            </li>
        }
        <li class="divider"></li>
        <li>
            <a asp-controller="Pizzas" asp-action="ListAll" asp-route-category="">View all pizzas</a>
        </li>
    </ul>
</li>
